package com.asset.crm.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;


@SuppressWarnings("serial")
@Table(name="account")
@Entity


public class Account implements Serializable{
	
	
	private  Integer id;
	
	
	private Employee accountCreator;
	
	
	private String accountName;
	
	private Integer parentAccountId;
	
	private String phone;
	
	private String mobile;
	
	private String fax;
	
	private String webSite;
	
	private String billingAdress;
	
	private String shipingAddress;
	
	private String type;
	
	private String industry;
	
	private String email;
	
	private Country country;
	
	private City city;
	
	private String state;
	
	private String street;
	
	private String zipCode;
	
	private Integer empNum;
	
	private Integer annualRevenue;
	
	private String description;
	private Boolean isDeleted;
	private Boolean isFollowed;
	
	private Date dateCreated;
	private Date dateModified;

	private String companyName;
	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="account_id_seq")
	@SequenceGenerator(name="account_id_seq",sequenceName="account_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the accountCreatorId
	 */
	@ManyToOne
	@JoinColumn(name="account_creator_id")
	public Employee getAccountCreator() {
		return accountCreator;
	}

	/**
	 * @param accountCreatorId the accountCreatorId to set
	 */
	public void setAccountCreator(Employee accountCreator) {
		this.accountCreator = accountCreator;
	}

	/**
	 * @return the accountName
	 */
	public String getAccountName() {
		return accountName;
	}

	/**
	 * @param accountName the accountName to set
	 */
	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}

	/**
	 * @return the parentAccountId
	 */
	public Integer getParentAccountId() {
		return parentAccountId;
	}

	/**
	 * @param parentAccountId the parentAccountId to set
	 */
	public void setParentAccountId(Integer parentAccountId) {
		this.parentAccountId = parentAccountId;
	}

	/**
	 * @return the phone
	 */
	public String getPhone() {
		return phone;
	}

	/**
	 * @param phone the phone to set
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}

	/**
	 * @return the fax
	 */
	public String getFax() {
		return fax;
	}

	/**
	 * @param fax the fax to set
	 */
	public void setFax(String fax) {
		this.fax = fax;
	}

	/**
	 * @return the webSite
	 */
	public String getWebSite() {
		return webSite;
	}

	/**
	 * @param webSite the webSite to set
	 */
	public void setWebSite(String webSite) {
		this.webSite = webSite;
	}

	/**
	 * @return the billingAdress
	 */
	public String getBillingAdress() {
		return billingAdress;
	}

	/**
	 * @param billingAdress the billingAdress to set
	 */
	public void setBillingAdress(String billingAdress) {
		this.billingAdress = billingAdress;
	}

	/**
	 * @return the shipingAddress
	 */
	public String getShipingAddress() {
		return shipingAddress;
	}

	/**
	 * @param shipingAddress the shipingAddress to set
	 */
	public void setShipingAddress(String shipingAddress) {
		this.shipingAddress = shipingAddress;
	}

	/**
	 * @return the typeId
	 */
	@Column(name="type")
	public String getType() {
		return type;
	}

	/**
	 * @param typeId the typeId to set
	 */
	public void setType( String type) {
		this.type = type;
	}

	/**
	 * @return the industryId
	 */
	@Column(name="industry")
	public String getIndustry() {
		return industry;
	}

	/**
	 * @param industryId the industryId to set
	 */
	public void setIndustry(String industry) {
		this.industry = industry;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the countryId
	 */
	@ManyToOne
	@JoinColumn(name="country_id")
	public Country getCountry() {
		return country;
	}

	/**
	 * @param countryId the countryId to set
	 */
	public void setCountry(Country country) {
		this.country = country;
	}

	/**
	 * @return the cityId
	 */
	@ManyToOne
	@JoinColumn(name="city_id")
	public City getCity() {
		return city;
	}

	/**
	 * @param cityId the cityId to set
	 */
	public void setCity(City city) {
		this.city = city;
	}

	/**
	 * @return the state
	 */
	public String getState() {
		return state;
	}

	/**
	 * @param state the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}

	/**
	 * @return the street
	 */
	public String getStreet() {
		return street;
	}

	/**
	 * @param street the street to set
	 */
	public void setStreet(String street) {
		this.street = street;
	}

	/**
	 * @return the zipCode
	 */
	public String getZipCode() {
		return zipCode;
	}

	/**
	 * @param zipCode the zipCode to set
	 */
	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	/**
	 * @return the empNum
	 */
	@Column(name="emp_num")
	public Integer getEmpNum() {
		return empNum;
	}

	/**
	 * @param empNum the empNum to set
	 */
	public void setEmpNum(Integer empNum) {
		this.empNum = empNum;
	}

	/**
	 * @return the annualRevenue
	 */
	@Column(name="ann_revenue")
	public Integer getAnnualRevenue() {
		return annualRevenue;
	}

	/**
	 * @param annualRevenue the annualRevenue to set
	 */
	public void setAnnualRevenue(Integer annualRevenue) {
		this.annualRevenue = annualRevenue;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the isDeleted
	 */
	@Column(name="is_deleted")
	public Boolean getIsDeleted() {
		return isDeleted;
	}

	/**
	 * @param isDeleted the isDeleted to set
	 */
	public void setIsDeleted(Boolean isDeleted) {
		this.isDeleted = isDeleted;
	}

	/**
	 * @return the isFollowed
	 */
	@Transient
	public Boolean getIsFollowed() {
		return isFollowed;
	}

	/**
	 * @param isFollowed the isFollowed to set
	 */
	public void setIsFollowed(Boolean isFollowed) {
		this.isFollowed = isFollowed;
	}
	/**
	 * @return the dateCreated
	 */
	@Temporal(value = TemporalType.TIMESTAMP)
	@Column(name="date_created")
	public Date getDateCreated() {
		return dateCreated;
	}
	/**
	 * @param dateCreated the dateCreated to set
	 */
	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}
	/**
	 * @return the dateModified
	 */
	@Temporal(value = TemporalType.TIMESTAMP)
	@Column(name="date_modified")
	public Date getDateModified() {
		return dateModified;
	}
	/**
	 * @param dateModified the dateModified to set
	 */
	public void setDateModified(Date dateModified) {
		this.dateModified = dateModified;
	}

	/**
	 * @return the companyName
	 */
	@Column(name="company_name")
	public String getCompanyName() {
		return companyName;
	}

	/**
	 * @param companyName the companyName to set
	 */
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	/**
	 * @return the mobile
	 */
	@Column(name="mobile")
	public String getMobile() {
		return mobile;
	}

	/**
	 * @param mobile the mobile to set
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	
	
}
